<?php

$message = $_POST['message'];
$destuser = $_POST['destuser']; //this is the username

global $site_root;

if ($message != "")
{
	$message = addslashes($message);
	require_once ($site_root . "common/PinSQL.obj");
	$pinSQL = new PinSQL();

	$id = $pinSQL->GetUserId($destuser);

	$pinSQL->Query("INSERT INTO bulletin
	(user_id, message)
	VALUES('$id', '$message')");
	

	
	
	$pinSQL->Close();
	
	include "gen_bulletin.php";
}
?>